﻿using System.Configuration;

namespace CommonCodeManagers.plugin
{
    public static class AppConfig
    {
        public static string GetConfig(string key)
        {
            return ConfigurationManager.AppSettings[key];
        }

        public static void SetConfig(string key, string value)
        {
            Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            cfa.AppSettings.Settings[key].Value = value;
            cfa.Save();
        }

    }
}